
#pragma once

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"

SG_DATASTRUCTURE_NAMESPACE_OPEN

/**
 * @brief    二级缓存数据结构 携带type
 *
 * @author   wuxingchuang
 * @date     2025.09.02
 */
struct TwoLayersWithTypeData
{
    SG::DataStructure::Common::I64              m_id   = 0;
    SG::DataStructure::Common::I64              m_type = 0;
    std::vector<SG::DataStructure::Common::I64> m_subs;

    TwoLayersWithTypeData () : m_id (0) {};

    TwoLayersWithTypeData (SG::DataStructure::Common::I64 p, std::vector<SG::DataStructure::Common::I64> subs)
        : m_id (p), m_subs (std::move (subs))
    {}

    TwoLayersWithTypeData (SG::DataStructure::Common::I64              p,
                           SG::DataStructure::Common::I64              t,
                           std::vector<SG::DataStructure::Common::I64> subs)
        : m_id (p), m_type (t), m_subs (std::move (subs))
    {}
};

/// @brief 比较两个TwoLayersData大小
/// @param lhs
/// @param rhs
/// @return
DECLSPEC bool operator< (const TwoLayersWithTypeData& nodeA, const TwoLayersWithTypeData& nodeB);


SG_DATASTRUCTURE_NAMESPACE_CLOSE